<?php
function get_facebook_info($url){
$url2 = "http://api.facebook.com/restserver.php?method=links.getStats&urls=".urlencode($url);
$xml = file_get_contents($url2);
$xml = simplexml_load_string($xml);
$data['like'] = intval($xml->link_stat->like_count);
$data['comment']= intval($xml->link_stat->comment_count); 

echo $data['like'];
echo "|".$data['comment'];
return $data;
}
$dt=get_facebook_info('http://bongdavl.vn/');
